<template>
  <div>
    <h1 align="center">门店列表</h1>
    <input type="button" value="查看优惠券" @click="tiao">
    <table class="table table-bordered">
      <tr>
        <td>门店名称</td>
        <td>门店分店名称</td>
        <td>门店地址</td>
        <td>门店照片</td>
        <td>电话</td>
        <td>状态</td>
        <td>使用须知</td>
      </tr>
      <tr v-for="item in list">
        <td>{{item.m_name}}</td>
        <td>{{item.m_Fname}}</td>
        <td>{{item.m_Dizhi}}</td>
        <td>
          <img src="/src/image/3.jpg" height="100" width="100">
        </td>
        <td>{{item.m_phone}}</td>
        <td>{{item.m_sate==1?'开启':'禁用'}}</td>
        <td>{{item.m_desc}}</td>
      </tr>
    </table>
  </div>
</template>

<script setup lang="ts">
import { reactive, toRefs, onMounted } from 'vue';
import axios from 'axios';
import { useRouter, useRoute } from 'vue-router';
const router = useRouter();
const route = useRoute();
let data: any = reactive({
  list: []
});
let { list } = toRefs(data);
//查看优惠券
const tiao=()=>{
   router.push('/Rshow')
}
onMounted (()=>{
  Show();
})
const Show = () => {
  axios({
    url: '/api/JIuidan/MSHOW',
    method: 'get'
  })
    .then((res) => {
      console.log(res);
      list.value = res.data.data;
    })
    .catch((err) => {
      console.log(err);
    });
};
</script>

<style scoped></style>
